
<form id="add-form1" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="col-sm-12">
        <div class="form-group">
            <div class="rr">
                <label class="control-label">用户：</label>
                {$info.user.nickname}
            </div>
        </div>
    </div>

    <div class="col-sm-6">
        <div class="form-group">
            <div class="rr">
                <label class="control-label">内容：</label>
                {:htmlspecialchars_decode($info.content)}
            </div>
        </div>
    </div>

    <div class="col-sm-6">
        <div class="form-group">
            <div class="rr">
                <label class="control-label">创建时间：</label>
                {$info.createtime|date='Y-m-d H:i:s',###}

            </div>
        </div>
    </div>
    {if $hf}
    <div class="col-sm-12">
        <div class="form-group">
            <div class="rr">
                <label class="control-label">回复信息：</label>
                <table class="table table-bordered">
                    <thead>
                      <tr>
                          <th>回复信息</th>
                          <th>回复时间</th>
                          <th>是否已读</th>
                      </tr>
                    </thead>
                    <tbody>
                    {foreach $hf as $k=>$v}
                      <tr>
                          <td>{:htmlspecialchars_decode($v.content)}</td>
                          <td> {$v.createtime|date='Y-m-d H:i:s',###}</td>
                          <td>
                              {if $v.yddata=='0'}
                              未读
                              {/if}
                              {if $v.yddata=='1'}
                              已读
                              {/if}
                          </td>
                      </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    {/if}

    <div class="col-sm-12">
        <div class="form-group">
            <div class="rr">
                <label class="control-label">回复：</label>
                <textarea id="c-content1" class="form-control editor" rows="5" name="content" cols="50"></textarea>


            </div>
        </div>
    </div>
    <div class="col-sm-12">
        <div class="form-group">
            <div class="rr">
                <button type="button" onclick="tk()"  class="btn btn-success btn-dialog">提交</button>


            </div>
        </div>
    </div>
</form>

<script>
    function tk(){
        var content = $("textarea").val();
        $.post('lyb/hf',{id:"{$info.id}",content:content},function (res){
            if(res.code==1){
                layer.msg('操作成功', {
                    time: 2000
                }, function () {
                    location.reload();
                });
            }else {
                layer.msg(res.msg);
                return;
            }
        })
    }


</script>
